// AWTLabel.h: interface for the AWTLabel class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_AWTLABEL_H__14341220_3D94_11D2_A3EF_006097A44215__INCLUDED_)
#define AFX_AWTLABEL_H__14341220_3D94_11D2_A3EF_006097A44215__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

#include "AWTComponent.h"

class AFX_EXT_CLASS AWTLabel : public AWTComponent  
{
DECLARE_DYNAMIC(AWTLabel)
public:
	AWTLabel();
	AWTLabel(LPTSTR text);
	AWTLabel(CString text);
	AWTLabel(CString* text);
	AWTLabel(CString text, int align);
	virtual ~AWTLabel();

	enum {LEFT, CENTER, RIGHT} align;

	CSize getMinimumSize();
	CSize getPreferredSize();

	CString& getText()
		{CString& r = m_text; return r;}
	void setText(CString& text)
	{
		m_text = text;
		if (m_peer != NULL)
			m_peer->SetWindowText(m_text);	
	}

private:
	void construct(CString text, int align)
	{
		m_text = text;
		m_align = align;
	}

protected:
	CWnd* createComponent();

	CString m_text;
	int m_align;

};

#endif // !defined(AFX_AWTLABEL_H__14341220_3D94_11D2_A3EF_006097A44215__INCLUDED_)
